#pragma once
#include <texture/texture.h>
#include"material.h"
#include"../BxDF/BlinnPhong.h"
#include"../BxDF/Lambertian.h"
#include"../BxDF/Specular.h"
class CommonMaterial : public Material
{
private:
	std::shared_ptr<Texture> kd, ks;//coefficients for diffuse term and highlight term
	int  ns;
	Float eta;
	bool divided_by_NdotL;
public:
	CommonMaterial(std::shared_ptr<Texture> kd, std::shared_ptr<Texture> ks,
		int ns = DEFAULT__BLINNPHONG_N, Float eta = 1.0, bool divided_by_NL = DEFAULT_DIVIDED) :
		kd(kd), ks(ks),
		ns(ns), eta(eta), divided_by_NdotL(divided_by_NL) {}
	shared_ptr<BSDF> createBSDF(const SurfaceInteraction* si, TransportMode mode);

};